package com.ys.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 提币表
 * </p>
 *
 * @author zpf
 * @since 2018-03-26
 */
@Data
@TableName("wallet_withdraw")
public class WalletWithdraw extends Model<WalletWithdraw> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 租户Id,保留字段，默认1
     */
    @TableField("tenantId")
    private Integer tenantId;
    /**
     * 提币单序列号，调用方提供不能重复，
可以用于查询提币单的状态
     */
    @TableField("sysNum")
    private String sysNum;
    /**
     * 提币from(可能会有多个from暂时先不考虑)
     */
    @TableField("fromAddress")
    private String fromAddress;
    /**
     * 提币地址
     */
    @TableField("toAddress")
    private String toAddress;
    /**
     * 提币数量小数
     */
    @TableField("withdrawAmount")
    private BigDecimal withdrawAmount;
    /**
     * 提币数量整形
     */
    @TableField("withdrawInt")
    private Integer withdrawInt;
    @TableField("withdrawFee")
    private BigDecimal withdrawFee;
    @TableField("withdrawGas")
    private BigDecimal withdrawGas;
    @TableField("withDrawGasPrice")
    private BigDecimal withDrawGasPrice;
    /**
     * 提币交易发送时的块号
     */
    @TableField("blockNum")
    private Integer blockNum;
    @TableField("blockHash")
    private String blockHash;
    /**
     * 交易hash
     */
    @TableField("txHash")
    private String txHash;
    /**
     * 资产类型
     */
    private Integer currency;
    /**
     * 资产链类型
     */
    @TableField("currencyChainType")
    private Integer currencyChainType;
    /**
     * 找零地址
     */
    @TableField("newAddressFrom")
    private String newAddressFrom;
    /**
     * 0：准备发送交易
10:  已发送交易
20： 已打包交易
30： 已完成
-1： 交易取消


     */
    private Integer status;
    /**
     * 确认的块数
     */
    @TableField("blockHeight")
    private Integer blockHeight;
    @TableField("jsonData")
    private String jsonData;
    /**
     * 输入时间
     */
    @TableField("inputDate")
    private Date inputDate;
    @TableField("editDate")
    private Date editDate;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
